<template>
	<view style="">
		<view class="dis_f aic juc mt20">
			<view class="fs26" >
				团队人数({{totalCount}}人)
			</view>
		</view>
		<view class="" style="margin-top: 50rpx;">
			<view class="zanwu" v-if="list.length == 0">
				暂无数据
			</view>
			<view class="list" v-for="(item,index) in list" :key="index" @click="zhitui(item)">

				<view class="dis_f aic jub top">
					<view class="dis_f">
						<image :src="item.head_img" mode="aspectFill"></image>
						<view class="" style="padding-left: 15rpx;">
							<view class="">
								{{item.nickname}}
							</view>
							<view class="time">
								绑定时间:{{item.addtime}}
							</view>
						</view>
					</view>
					<view class="tuig">
						积分:{{item.jfcount}}
					</view>
				</view>

			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [],
				tabindex: 0,
				tablist: [{
					name: '',
				}, ],
				page: 1,
				limit: 8,
				totalPage: 0,
				user: "",
				class: undefined,
				id: undefined,
				totalCount:0
			}
		},
		onLoad() {
			this.user = uni.getStorageSync('user')
			this.orderlist()
		},

		methods: {
			zhitui(item) {
				if(this.class == 2) {
					return false
				}
				this.class = 2
				this.id = item.id
				this.orderlist()
			},
			// 团队列表
			orderlist(isMore) {
				this.api.post('user/myteam').then(res => {
					console.log(res);
					if (res.code == 200) {
						
						this.list = res.data
						this.totalCount = res.ext.totalCount
					}
				})
			},
			tabcli(index) {
				this.tabindex = index
			}
		}
	}
</script>

<style lang="scss">
	.bottom {
		padding: 20rpx 0 10rpx;
		color: #a9a9a9;
		border-top: 1px solid #efefef;
		margin-top: 30rpx;
		font-size: 28rpx;
	}

	.time {
		color: #a9a9a9;
		font-size: 24rpx;
		padding-top: 20rpx;
	}

	.tuig {
		font-size: 24rpx;
	}

	.tabzhon {
		position: relative;
		color: #feb746;
		font-size: 28rpx;
		font-weight: bold;
	}

	.tabzhon:before {
		content: '';
		position: absolute;
		bottom: -20rpx;
		width: 167rpx;
		height: 2px;
		background-color: #feb746;
		transform: translateX(-50%);
		left: 50%;
	}

	.tab {
		font-size: 28rpx;
	}

	.list {
		padding: 15rpx 20rpx;
		background: #fff;
		margin-bottom: 20rpx;
		box-shadow: 0 0 37rpx 1rpx #efefef;
	}

	.list image {
		width: 100rpx;
		height: 100rpx;
	}
</style>
